<% add_decidim_page_title(t("new", scope: "decidim.initiatives.create_initiative.select_initiative_type")) %>
<% content_for :back_link do %>
  <%= link_to :back do %>
    <%= icon "arrow-left-s-line", class: "icon--small", role: "img", "aria-hidden": true %>
    <%= t(".back") %>
  <% end %>
<% end %>

<% is_validating = current_initiative.validating? %>

<% announcement_body = capture do %>
  <% if is_validating %>
    <%= t("callout_text_validating", scope: "decidim.initiatives.create_initiative.finish") %>
  <% else %>
    <%= t("callout_text_created", scope: "decidim.initiatives.create_initiative.finish") %>
  <% end %>
<% end %>

<%= cell("decidim/announcement", { body: announcement_body }, callout_class: "secondary") %>

<div class="form__wrapper">
  <p><%= t "publish_helper_text_html", scope: "decidim.initiatives.create_initiative.finish" %></p>
</div>

<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
  <% if is_validating %>
    <%= link_to t(".go_to_initiatives"), decidim_initiatives.initiatives_path(locale: current_locale), class: "button button__sm md:button__lg button__secondary" %>
  <% else %>
    <%= link_to fill_data_create_initiative_index_path(locale: current_locale), class: "button button__sm md:button__lg button__text-secondary" do %>
      <%= icon "arrow-left-line", class: "fill-current" %>
      <%= t("back", scope: "decidim.initiatives.create_initiative.previous_form") %>
    <% end %>

    <%= render partial: "send_to_technical_validation_button" %>
  <% end %>
</div>
